function getMockData() {
    return new Promise((resolve) => {

        const number = 200;
        const nodes = [];
        const edges = [];

        const categories = [
            {
                name: "组织A",
                symbol: "circle",
                color: '#5470c6'
            },
            {
                name: "组织B",
                symbol: "circle",
                color: '#91cc75'
            },
            {
                name: "组织C",
                symbol: "circle",
                color: '#fac858'

            },
            {
                name: "组织D",
                symbol: "circle",
                color: '#ee6666'
            },
            {
                name: "组织E",
                symbol: "circle",
                color: '#73c0de'
            },
            {
                name: "组织F",
                symbol: "circle",
                color: '#3ba272'
            },
            {
                name: "组织G",
                symbol: "circle",
                color: '#fc8452'
            },
            {
                name: "组织H",
                symbol: "circle",
                color: '#9a60b4'
            },
            {
                name: "组织I",
                symbol: "circle",
                color: '#ea7ccc'
            }
        ]

        for (let i = 0; i < number; i++) {
            const symbolSize = Math.random() * 50; //元素的大小（圆）
            const category = i % 9;
            const size = Math.random() * 30 + 5;
            nodes.push({
                id: `id_${i}`,
                name: `李${i}`,
                symbolSize,
                size,//g6
                value: 28.685715,
                category, //分类
                style: {
                    //g6
                    fill: categories[category].color
                }
            })
        }

        for (let i = 0; i < number; i++) {
            let target = nodes[i].id;
            let num = parseInt(Math.random() * 3)
            for (let j = 0; j < num; j++) {
                let source = nodes[parseInt(Math.random() * number)].id;
                let existed = edges.find(item => (item.source === source && item.target === target) || (item.source === target && item.target === source))
                if (source !== target && !existed) {
                    edges.push({
                        source,
                        target
                    })
                }
            }
        }

        resolve({
            nodes,
            edges,
            categories
        })
    })
}

export default getMockData